package com.liveinstars.im.common.enums;

import java.util.HashMap;

/**
 * @author: zhouze
 * @date: 2020/3/5
 */
public enum ReportTypeEnum {

    MARKETING_GARBAGE(1, "营销垃圾"),

    OBSCENE_PORNOGRAPHY(2, "淫秽色情"),

    ILLEGAL_INFORMATION(3, "违法信息"),

    HARASSMENT_INFORMATION(4, "骚扰信息"),
    ;

    private String text;
    private int value;

    ReportTypeEnum( int value, String text) {
        this.text = text;
        this.value = value;
    }

    private static HashMap<Integer, ReportTypeEnum> enumValueMap = new HashMap<>();

    static {
        for (ReportTypeEnum reportTypeEnum : ReportTypeEnum.values()) {
            enumValueMap.put(reportTypeEnum.getValue(), reportTypeEnum);
        }
    }

    public static ReportTypeEnum valueOf(int value) {
        return enumValueMap.get(value);
    }

    public String getText() {
        return text;
    }

    public int getValue() {
        return value;
    }
}
